<template>
	<el-dialog title="" visible :show-close="false" :modal-append-to-body="false" class="wrap" size="tiny">
		<div class="bt">详情</div>
		<i class="el-icon-close close" @click="cancel" style="color: white;"></i>
		<el-form label-width="100px" class="form">
			<el-form-item label="学生名称">
				  <el-input v-model="form.zwm" :readonly='true'  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="物品名称">
				  <el-input v-model="form.wpmc" :readonly='true'  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="物品分类">
				  <el-input v-model="form.wpfl" :readonly='true'  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="退费金额">
				  <el-input v-model="form.tfje" :readonly='true'  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="退费原因">
				  <el-input v-model="form.tfyy" :readonly='true'  icon="info" class="select-block"></el-input>
			</el-form-item>
			<el-form-item label="退学时间">
				  <el-input v-model="form.txsj" :readonly='true'  icon="info" class="select-block"></el-input>
			</el-form-item>
		</el-form>
		<el-button type="danger" class="submit" @click="cancel">确定</el-button>
	</el-dialog>
</template>

<script type="text/javascript">
	import qs from 'qs'
	export default {
		props: ['params'],
		data() {
			return {
				form: {
					zwm :'',
					tfje :'',
					tfyy :'',
					txsj :'',
				},
					id: ''
			}
		},
		created() {
//			alert(this.params)
//			console.log(this.params,'22222222222222222222222')
      this.id=this.params.row.id;
			this.loadinfo();
		},
		methods: {
			loadinfo(){
				var logininfo = JSON.parse(localStorage.logininfo);
             var params2 = qs.stringify({
                      xxid:logininfo.xxid,
											 yhid:logininfo.id,
											 xsid:this.id
               })
             //执行
                 this.axios.post(this.$store.state.api + 'xs/txtfinfo',  params2 )
                 .then(res => {
                this.form=res.data.data.list[0]
                 }).catch(res => {
					 this.$message.warning("服务器异常");
			 				this.$emit('close', { type: 'xq', cancel: true });
				})
			},
			cancel() {
				this.$emit('close', { type: 'xq', cancel: true })
			}
		}
	}
</script>

<style lang="less" scoped>
	.wrap {
		text-align: center;
	}
	.bt{
			position: absolute;
			width: 100%;
			height: 50px;
			margin: 0 auto;
			top: 0;
			left: 0;
			background: #50BFFF;
			color:white;
			text-align:left;
			line-height: 50px;
			font-size: 17px;
			padding-left: 15px;
		}

	.form {
		text-align: left;
		margin-top: 20px;
	}
	 .input {
            width: 300px;
            display: inline-block;
        }

	.select-block {
		display: block;
		width: 85%;
	}

	.submit {
		width: 120px;
	}
</style>
